package com.dragon.modules.yuegou.model.merchant;

import com.dragon.modules.yuegou.entity.merchant.MerchantLevelEntity;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelOrderType;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelStatus;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商户等级模型类
 * 
 * @author pbuilder generated
 * @date 2019-09-23 15:27:57
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MerchantLevel extends MerchantLevelEntity {

	/**
	 * 构造一个空商户等级模型对象
	 */
	public MerchantLevel(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个商户等级模型对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantLevel(MerchantLevelEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商户等级模型对象
	 * 
	 * @param other 其它对象
	 */
	public MerchantLevel(MerchantLevel other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置主键
	 * 
	 * @param id 主键
	 * @return 当前对象
	 */
    public MerchantLevel id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public MerchantLevel merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getMerchantName() {
    	return merchantName;
    }

    /**
	 * 设置商户名称
	 * 
	 * @param merchantName 商户名称
	 * @return 当前对象
	 */
    public MerchantLevel merchantName(String merchantName) {
    	this.merchantName = merchantName;
    	return this;
    }

	@Override
	public String getLevelId() {
    	return levelId;
    }

    /**
	 * 设置等级ID
	 * 
	 * @param levelId 等级ID
	 * @return 当前对象
	 */
    public MerchantLevel levelId(String levelId) {
    	this.levelId = levelId;
    	return this;
    }

	@Override
	public LocalDateTime getBuyTime() {
    	return buyTime;
    }

    /**
	 * 设置购买时间
	 * 
	 * @param buyTime 购买时间
	 * @return 当前对象
	 */
    public MerchantLevel buyTime(LocalDateTime buyTime) {
    	this.buyTime = buyTime;
    	return this;
    }

	@Override
	public Integer getPeriodValidity() {
    	return periodValidity;
    }

    /**
	 * 设置有效期限，单位：月
	 * 
	 * @param periodValidity 有效期限，单位：月
	 * @return 当前对象
	 */
    public MerchantLevel periodValidity(Integer periodValidity) {
    	this.periodValidity = periodValidity;
    	return this;
    }

	@Override
	public LocalDateTime getStartTime() {
    	return startTime;
    }

    /**
	 * 设置有效期开始时间
	 * 
	 * @param startTime 有效期开始时间
	 * @return 当前对象
	 */
    public MerchantLevel startTime(LocalDateTime startTime) {
    	this.startTime = startTime;
    	return this;
    }

	@Override
	public LocalDateTime getEndTime() {
    	return endTime;
    }

    /**
	 * 设置有效期结束时间
	 * 
	 * @param endTime 有效期结束时间
	 * @return 当前对象
	 */
    public MerchantLevel endTime(LocalDateTime endTime) {
    	this.endTime = endTime;
    	return this;
    }

	@Override
	public BigDecimal getPayAmount() {
    	return payAmount;
    }

    /**
	 * 设置支付金额
	 * 
	 * @param payAmount 支付金额
	 * @return 当前对象
	 */
    public MerchantLevel payAmount(BigDecimal payAmount) {
    	this.payAmount = payAmount;
    	return this;
    }

	@Override
	public BigDecimal getBackAmount() {
    	return backAmount;
    }

    /**
	 * 设置退还金额
	 * 
	 * @param backAmount 退还金额
	 * @return 当前对象
	 */
    public MerchantLevel backAmount(BigDecimal backAmount) {
    	this.backAmount = backAmount;
    	return this;
    }

	@Override
	public BigDecimal getServiceDiscount() {
    	return serviceDiscount;
    }

    /**
	 * 设置服务费折扣
	 * 
	 * @param serviceDiscount 服务费折扣
	 * @return 当前对象
	 */
    public MerchantLevel serviceDiscount(BigDecimal serviceDiscount) {
    	this.serviceDiscount = serviceDiscount;
    	return this;
    }

	@Override
	public LocalDateTime getBackTime() {
    	return backTime;
    }

    /**
	 * 设置退还时间
	 * 
	 * @param backTime 退还时间
	 * @return 当前对象
	 */
    public MerchantLevel backTime(LocalDateTime backTime) {
    	this.backTime = backTime;
    	return this;
    }

	@Override
	public String getBackInfo() {
    	return backInfo;
    }

    /**
	 * 设置退还信息
	 * 
	 * @param backInfo 退还信息
	 * @return 当前对象
	 */
    public MerchantLevel backInfo(String backInfo) {
    	this.backInfo = backInfo;
    	return this;
    }

	@Override
	public String getOrderNo() {
    	return orderNo;
    }

    /**
	 * 设置订单号
	 * 
	 * @param orderNo 订单号
	 * @return 当前对象
	 */
    public MerchantLevel orderNo(String orderNo) {
    	this.orderNo = orderNo;
    	return this;
    }

	@Override
	public MerchantLevelOrderType getOrderType() {
    	return orderType;
    }

    /**
	 * 设置[枚举]订单类型：0-续费-RENEWAL、1-直接购买-BUY、2-升级-UPLEVEL
	 * 
	 * @param orderType [枚举]订单类型：0-续费-RENEWAL、1-直接购买-BUY、2-升级-UPLEVEL
	 * @return 当前对象
	 */
    public MerchantLevel orderType(MerchantLevelOrderType orderType) {
    	this.orderType = orderType;
    	return this;
    }

	@Override
	public BigDecimal getUpgradeAmount() {
    	return upgradeAmount;
    }

    /**
	 * 设置升级抵消金额
	 * 
	 * @param upgradeAmount 升级抵消金额
	 * @return 当前对象
	 */
    public MerchantLevel upgradeAmount(BigDecimal upgradeAmount) {
    	this.upgradeAmount = upgradeAmount;
    	return this;
    }

	@Override
	public MerchantLevelStatus getStatus() {
    	return status;
    }

    /**
	 * 设置[枚举]支付状态：0-未支付-NOPAY、1-已支付-PAID、2-失效-INVALID
	 * 
	 * @param status [枚举]支付状态：0-未支付-NOPAY、1-已支付-PAID、2-失效-INVALID
	 * @return 当前对象
	 */
    public MerchantLevel status(MerchantLevelStatus status) {
    	this.status = status;
    	return this;
    }

	@Override
	public String getPayType() {
    	return payType;
    }

    /**
	 * 设置0 第三方支付 1钱包支付
	 * 
	 * @param payType 0 第三方支付 1钱包支付
	 * @return 当前对象
	 */
    public MerchantLevel payType(String payType) {
    	this.payType = payType;
    	return this;
    }

	@Override
	public String getLevelDetailId() {
    	return levelDetailId;
    }

    /**
	 * 设置等级细项ID
	 * 
	 * @param levelDetailId 等级细项ID
	 * @return 当前对象
	 */
    public MerchantLevel levelDetailId(String levelDetailId) {
    	this.levelDetailId = levelDetailId;
    	return this;
    }

	@Override
	public LocalDateTime getOrderTime() {
    	return orderTime;
    }

    /**
	 * 设置下单时间
	 * 
	 * @param orderTime 下单时间
	 * @return 当前对象
	 */
    public MerchantLevel orderTime(LocalDateTime orderTime) {
    	this.orderTime = orderTime;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置
	 * 
	 * @param createdTime 
	 * @return 当前对象
	 */
    public MerchantLevel createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public String getCreatedBy() {
    	return createdBy;
    }

    /**
	 * 设置
	 * 
	 * @param createdBy 
	 * @return 当前对象
	 */
    public MerchantLevel createdBy(String createdBy) {
    	this.createdBy = createdBy;
    	return this;
    }

	@Override
	public LocalDateTime getModifiedTime() {
    	return modifiedTime;
    }

    /**
	 * 设置
	 * 
	 * @param modifiedTime 
	 * @return 当前对象
	 */
    public MerchantLevel modifiedTime(LocalDateTime modifiedTime) {
    	this.modifiedTime = modifiedTime;
    	return this;
    }

	@Override
	public String getModifiedBy() {
    	return modifiedBy;
    }

    /**
	 * 设置
	 * 
	 * @param modifiedBy 
	 * @return 当前对象
	 */
    public MerchantLevel modifiedBy(String modifiedBy) {
    	this.modifiedBy = modifiedBy;
    	return this;
    }
}
